From: Valdnet <47037905+Valdnet@users.noreply.github.com> Date: Tue, 14 Sep 2021 15:31:19 +0000 (+0200) Subject: improve translations of strings with numbers inside X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~30^2^2~215^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=61ccde6b7c2c16a9576909a2ba68c7215ee40909;p=nextcloud-desktop.git improve translations of strings with numbers inside tell tr that there is a number inside the translated string such that translators can provide the proper plural forms Changing text strings to correctly import them into Transifex. Issue #3776. Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com> --- diff --git a/src/gui/userstatusselectormodel.cpp b/src/gui/userstatusselectormodel.cpp index 778013eae..69f698ade 100644 --- a/src/gui/userstatusselectormodel.cpp +++ b/src/gui/userstatusselectormodel.cpp @@ -413,21 +413,21 @@ QString UserStatusSelectorModel::timeDifferenceToString(int differenceSecs) cons if (minutesLeft == 1) { return tr("1 minute"); } else { - return tr("%1 minutes").arg(minutesLeft); + return tr("%1 minutes", "", minutesLeft).arg(minutesLeft); } } else if (differenceSecs < 60 * 60 * 24) { const auto hoursLeft = std::ceil(differenceSecs / 60.0 / 60.0); if (hoursLeft == 1) { return tr("1 hour"); } else { - return tr("%1 hours").arg(hoursLeft); + return tr("%1 hours", "", hoursLeft).arg(hoursLeft); } } else { const auto daysLeft = std::ceil(differenceSecs / 60.0 / 60.0 / 24.0); if (daysLeft == 1) { return tr("1 day"); } else { - return tr("%1 days").arg(daysLeft); + return tr("%1 days", "", daysLeft).arg(daysLeft); } } }